package com.lemon.smartsafety.ui.activity.common;

import android.os.Bundle;

import com.lemon.smartsafety.app.BundleKey;
import com.lemon.smartsafety.app.EventTag;
import com.lemon.smartsafety.entity.event.common.SelectItemEvent;
import com.lemon.smartsafety.http.service.AddressBookServices;
import com.lemon.smartsafety.ui.activity.notice.NoticeContactListActivity;
import com.lemon.smartsafety.utils.app.UIHelper;
import com.lemon.smartsafety.utils.common.LoggerHelper;

import org.greenrobot.eventbus.Subscribe;

/**
 * Created by Cooliean on 16/4/6.
 */
public class AddressSelectActivity extends SelectBaseActivity {
    private LoggerHelper loggerHelper = new LoggerHelper(AddressSelectActivity.class);

    @Override
    public String getTag() {
        return EventTag.TAG_ADDRESS_BOOK_SELECT;
    }

    @Override
    public void getNetData() {
        AddressBookServices.init().getAddressListForSelect();
    }


    @Override
    protected void initTitle() {
        setBarTitle("通讯录");
    }


    /**
     * 单选
     * @param event
     */
    @Subscribe
    public void onEventMainThread(SelectItemEvent event) {

        Bundle bundle = new Bundle();
        bundle.putSerializable(BundleKey.NOTICE_CONTACT,event);
        UIHelper.showActivity(this, bundle, NoticeContactListActivity.class);
    }

}
